﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:basic="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"
                    xmlns:primitives="clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit"
                    xmlns:vsm="clr-namespace:System.Windows;assembly=WPFToolkit">


    <!--SHINY BLUE SETTINGS FOR CHARTS-->
    <LinearGradientBrush x:Key="ShinyChartOrange" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFDDBAE" Offset="0" />
        <GradientStop Color="#FFCE955A" Offset="0.185" />
        <GradientStop Color="#FFAB7547" Offset="0.475" />
        <GradientStop Color="#FF704D28" Offset="1" />
    </LinearGradientBrush>


    <LinearGradientBrush x:Key="ShinyChartYellow" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFF72" Offset="0" />
        <GradientStop Color="#FFC0C256" Offset="0.17" />
        <GradientStop Color="#FFCAC64C" Offset="0.49" />
        <GradientStop Color="#FF8F8832" Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShinyChartCyan" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFBBF4FD" Offset="0" />
        <GradientStop Color="#FF62B8BC" Offset="0.185" />
        <GradientStop Color="#FF5A9399" Offset="0.475" />
        <GradientStop Color="#FF355E60" Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShinyChartGreen" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFBAF9DA" Offset="0" />
        <GradientStop Color="#FF62BC8A" Offset="0.185" />
        <GradientStop Color="#FF5A996D" Offset="0.475" />
        <GradientStop Color="#FF35603A" Offset="1" />
    </LinearGradientBrush>


    <LinearGradientBrush x:Key="ChartBorder" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFBBBBBB" />
        <GradientStop Color="#FF737373" Offset="0.160" />
        <GradientStop Color="#FF646464" Offset="0.162" />
        <GradientStop Color="#FF000000" Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShinyBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFBBBBBB" />
        <GradientStop Color="#FF000000" Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="PlotAreaBrush" EndPoint="0.5,0.987" StartPoint="0.5,0.03">
        <GradientStop Color="#FFFFFFFF"/>
        <GradientStop Color="#FFFFFFFF" Offset="1"/>
        <GradientStop Color="#FEDBDBDB" Offset="0.196"/>
        <GradientStop Color="#FEE7E7E7" Offset="0.121"/>
        <GradientStop Color="#FEF4F4F4" Offset="0.058"/>
    </LinearGradientBrush>

    <Color x:Key="ShinyTopGradientOrange">#FFFDDBAE</Color>
    <Color x:Key="ShinyBottomGradientOrange">#FF704D28</Color>
    <RadialGradientBrush x:Key="ShinyPieDataPointBrushOrange">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.09" ScaleY="1.819"/>
                <SkewTransform CenterX="0.5" CenterY="0.5"/>
                <RotateTransform CenterX="0.5" CenterY="0.5"/>
                <TranslateTransform X="-0.425" Y="-0.486"/>
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Color="{StaticResource ShinyTopGradientOrange}"/>
        <GradientStop Color="{StaticResource ShinyBottomGradientOrange}" Offset="1"/>
    </RadialGradientBrush>


    <Color x:Key="ShinyTopGradientYellow">#FFFFFF72</Color>
    <Color x:Key="ShinyBottomGradientYellow">#FF8F8832</Color>
    <RadialGradientBrush x:Key="ShinyPieDataPointBrushYellow">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.09" ScaleY="1.819"/>
                <SkewTransform CenterX="0.5" CenterY="0.5"/>
                <RotateTransform CenterX="0.5" CenterY="0.5"/>
                <TranslateTransform X="-0.425" Y="-0.486"/>
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Color="{StaticResource ShinyTopGradientYellow}"/>
        <GradientStop Color="{StaticResource ShinyBottomGradientYellow}" Offset="1"/>
    </RadialGradientBrush>

    <Color x:Key="ShinyTopGradientCyan">#FFBBF4FD</Color>
    <Color x:Key="ShinyBottomGradientCyan">#FF355E60</Color>
    <RadialGradientBrush x:Key="ShinyPieDataPointBrushCyan">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.09" ScaleY="1.819"/>
                <SkewTransform CenterX="0.5" CenterY="0.5"/>
                <RotateTransform CenterX="0.5" CenterY="0.5"/>
                <TranslateTransform X="-0.425" Y="-0.486"/>
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Color="{StaticResource ShinyTopGradientCyan}"/>
        <GradientStop Color="{StaticResource ShinyBottomGradientCyan}" Offset="1"/>
    </RadialGradientBrush>

    <Color x:Key="ShinyTopGradientGreen">#FFBAF9DA</Color>
    <Color x:Key="ShinyBottomGradientGreen">#FF35603A</Color>
    <RadialGradientBrush x:Key="ShinyPieDataPointBrushGreen">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.09" ScaleY="1.819"/>
                <SkewTransform CenterX="0.5" CenterY="0.5"/>
                <RotateTransform CenterX="0.5" CenterY="0.5"/>
                <TranslateTransform X="-0.425" Y="-0.486"/>
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Color="{StaticResource ShinyTopGradientGreen}"/>
        <GradientStop Color="{StaticResource ShinyBottomGradientGreen}" Offset="1"/>
    </RadialGradientBrush>


    <!--SHINY DARK PURPLE-->
    <Color x:Key="TextBrush">#FF000000</Color>


    <Color x:Key="NormalBrushGradient1">#FFFFFFFF</Color>
    <Color x:Key="NormalBrushGradient2">#FFCFBDDA</Color>
    <Color x:Key="NormalBrushGradient3">#FF9B86A8</Color>
    <Color x:Key="NormalBrushGradient4">#FF55465F</Color>



    <Color x:Key="NormalBorderBrushGradient1">#FFBBBBBB</Color>
    <Color x:Key="NormalBorderBrushGradient2">#FF737373</Color>
    <Color x:Key="NormalBorderBrushGradient3">#FF646464</Color>
    <Color x:Key="NormalBorderBrushGradient4">#FF000000</Color>

    <Color x:Key="SelectedBackgroundGradient1">#FFBBBBBB</Color>
    <Color x:Key="SelectedBackgroundGradient2">#FF737373</Color>
    <Color x:Key="SelectedBackgroundGradient3">#FF646464</Color>
    <Color x:Key="SelectedBackgroundGradient4">#FFA1A1A1</Color>

    <Color x:Key="SliderBorderGradient1">#FF3F3F3F</Color>
    <Color x:Key="SliderBorderGradient2">#FFADADAD</Color>

    <Color x:Key="ShadeBrushGradient1">#FF62676A</Color>
    <Color x:Key="ShadeBrushGradient2">#FFD1D4D6</Color>
    <Color x:Key="ShadeBrushGradient3">#FFFFFFFF</Color>

    <Color x:Key="WindowBackgroundBrushGradient1">#FFD1D1D1</Color>
    <Color x:Key="WindowBackgroundBrushGradient2">#FF8496AA</Color>


    <LinearGradientBrush x:Key="NormalBrush"
                       EndPoint="0.5,1"
                       StartPoint="0.5,0">
        <GradientStop Color="{StaticResource NormalBrushGradient1}"
                  Offset="0" />
        <GradientStop Color="{StaticResource NormalBrushGradient2}"
                  Offset="0.41800001263618469" />
        <GradientStop Color="{StaticResource NormalBrushGradient3}"
                  Offset="0.418" />
        <GradientStop Color="{StaticResource NormalBrushGradient4}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="NormalBorderBrush"
                       EndPoint="0.5,1"
                       StartPoint="0.5,0">
        <GradientStop Color="{StaticResource NormalBorderBrushGradient1}" />
        <GradientStop Color="{StaticResource NormalBorderBrushGradient2}"
                  Offset="0.38" />
        <GradientStop Color="{StaticResource NormalBorderBrushGradient3}"
                  Offset="0.384" />
        <GradientStop Color="{StaticResource NormalBorderBrushGradient4}"
                  Offset="1" />
    </LinearGradientBrush>

    <RadialGradientBrush x:Key="HoverBrush">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <ScaleTransform CenterX="0.5"
                        CenterY="0.5"
                        ScaleX="1.804"
                        ScaleY="0.743" />
                <SkewTransform CenterX="0.5"
                       CenterY="0.5" />
                <RotateTransform CenterX="0.5"
                         CenterY="0.5" />
                <TranslateTransform Y="0.47999998927116394" />
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Color="#FF98DAFF"
                  Offset="0.209" />
        <GradientStop Color="#0098DAFF"
                  Offset="1" />
        <GradientStop Color="#FFFFFFFF"
                  Offset="0" />
    </RadialGradientBrush>

    <LinearGradientBrush x:Key="CheckIconBrush"
                       EndPoint="0.5,1"
                       StartPoint="0.5,0">
        <GradientStop Color="#FF006CD1" />
        <GradientStop Color="#FFA5D6F9"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrush"
                       EndPoint="0.5,1"
                       StartPoint="0.5,0">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}"
                  Offset="0" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrushTop"
                       EndPoint="0.5,1"
                       StartPoint="0.5,0">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}"
                  Offset="0" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrushBottom"
                       EndPoint="0.5,0"
                       StartPoint="0.5,1">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrushLeft"
                       EndPoint="1,0.5"
                       StartPoint="0,0.5">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrushRight"
                       EndPoint="0,0.5"
                       StartPoint="1,0.5">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="DisabledBackgroundBrush"
                       EndPoint="0.5,1"
                       StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF" />
        <GradientStop Color="#FF62676A"
                  Offset="1" />
        <GradientStop Color="#FFD1D4D6"
                  Offset="0.41800001263618469" />
        <GradientStop Color="#FFA9AFB5"
                  Offset="0.425" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="SelectedBackgroundBrush"
                       EndPoint="0.5,1"
                       StartPoint="0.5,0">
        <GradientStop Color="{StaticResource SelectedBackgroundGradient1}" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient2}"
                  Offset="0.38" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient3}"
                  Offset="0.384" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient4}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="SelectedBackgroundBrushVertical"
                       EndPoint="2.05,0.5"
                       StartPoint="-0.55,0.5">
        <GradientStop Color="{StaticResource SelectedBackgroundGradient1}" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient2}"
                  Offset="0.37999999523162842" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient3}"
                  Offset="0.38400000333786011" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient4}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="HorizontalSliderBorderBrush"
                       EndPoint="0.5,1"
                       StartPoint="0.5,0">
        <GradientStop Color="{StaticResource SliderBorderGradient1}" />
        <GradientStop Color="{StaticResource SliderBorderGradient2}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="VerticalSliderBorderBrush"
                       EndPoint="1.35,0.5"
                       StartPoint="0.6,0.5">
        <GradientStop Color="{StaticResource SliderBorderGradient1}" />
        <GradientStop Color="{StaticResource SliderBorderGradient2}"
                  Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="WindowBackgroundBrush"
                       EndPoint="0.5,1"
                       StartPoint="0.5,0">
        <GradientStop Color="{StaticResource WindowBackgroundBrushGradient1}" />
        <GradientStop Color="{StaticResource WindowBackgroundBrushGradient2}"
                  Offset="1" />
    </LinearGradientBrush>

    <!--Button-->
    <Style TargetType="Button">
        <Setter Property="Background"
            Value="{StaticResource NormalBrush}"/>
        <Setter Property="Foreground"
            Value="#FFFFFFFF"/>
        <Setter Property="Padding"
            Value="3"/>
        <Setter Property="BorderThickness"
            Value="2"/>
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="MouseOver"/>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="Pressed"/>
                                    <VisualTransition From="Normal"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="MouseOver"/>
                                    <VisualTransition From="MouseOver"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Normal"/>
                                    <VisualTransition From="Pressed"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="MouseOver"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Hover"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="Background"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="0.7"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2,2,2,2">
                            <Border x:Name="Hover"
                      Background="{StaticResource HoverBrush}"
                      CornerRadius="2,2,2,2"
                      Height="Auto"
                      Width="Auto"
                      Opacity="0"/>
                        </Border>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Margin="{TemplateBinding Padding}"
                              x:Name="contentPresenter"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Content="{TemplateBinding Content}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        <Border x:Name="DisabledVisualElement"
                    IsHitTestVisible="false"
                    Opacity="0"
                    Background="{StaticResource DisabledBackgroundBrush}"
                    CornerRadius="2,2,2,2"/>
                        <Border x:Name="FocusVisualElement"
                    IsHitTestVisible="false"
                    Visibility="Collapsed"
                    BorderBrush="{StaticResource HoverBrush}"
                    BorderThickness="2,2,2,2"
                    CornerRadius="2,2,2,2"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--Checkbox-->
    <Style  TargetType="CheckBox">
        <Setter Property="Background"
            Value="{StaticResource NormalBrush}"/>
        <Setter Property="Foreground"
            Value="Black" />
        <Setter Property="HorizontalContentAlignment"
            Value="Left"/>
        <Setter Property="VerticalContentAlignment"
            Value="Top"/>
        <Setter Property="Padding"
            Value="4,1,0,0"/>
        <Setter Property="BorderThickness"
            Value="2"/>
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="MouseOver"/>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="Pressed"/>
                                    <VisualTransition From="Normal"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="MouseOver"/>
                                    <VisualTransition From="MouseOver"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Normal"/>
                                    <VisualTransition From="Pressed"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="MouseOver"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundOverlay"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="CheckIcon"
                                                   Storyboard.TargetProperty="(Shape.StrokeThickness)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="Background"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="0.7"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Checked"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Unchecked"/>
                                    <VisualTransition From="Unchecked"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="Checked"/>
                                    <VisualTransition From="Checked"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="Indeterminate"/>
                                    <VisualTransition From="Indeterminate"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Unchecked"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="CheckIcon"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="16"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid HorizontalAlignment="Left"
                  VerticalAlignment="Top">
                            <Rectangle Height="14"
                         Margin="1"
                         x:Name="Background"
                         Width="14"
                         Fill="{TemplateBinding Background}"
                         Stroke="{TemplateBinding BorderBrush}"
                         StrokeThickness="{TemplateBinding BorderThickness}"
                         RadiusX="1"
                         RadiusY="1"/>
                            <Rectangle Height="12"
                         x:Name="BackgroundOverlay"
                         Width="12"
                         Opacity="0"
                         Fill="{StaticResource HoverBrush}"
                         Stroke="{x:Null}"
                         StrokeThickness="1"
                         RadiusX="1"
                         RadiusY="1"/>

                            <Path x:Name="CheckIcon"
                    Stretch="Fill"
                    Data="M102.03442,598.79645 L105.22962,597.78918 L106.95686,599.19977 C106.95686,599.19977 113.77958,590.53656 113.77958,590.53656 C113.77958,590.53656 107.40649,603.79431 107.40649,603.79431 z"
                    Opacity="0"
                    Fill="#FFFFFFFF"
                    Height="10"
                    Width="10.5"
                    Stroke="{StaticResource CheckIconBrush}"
                    StrokeThickness="0"/>

                            <Rectangle Height="9"
                         x:Name="IndeterminateIcon"
                         Width="9"
                         Opacity="0"
                         Fill="#FFFFFFFF"
                         Stroke="{StaticResource CheckIconBrush}"
                         RadiusX="1"
                         RadiusY="1"/>
                            <Rectangle Height="14"
                         x:Name="DisabledVisualElement"
                         Width="14"
                         Opacity="0"
                         Fill="{StaticResource DisabledBackgroundBrush}"
                         RadiusX="1"
                         RadiusY="1"/>
                            <Rectangle Height="16"
                         x:Name="ContentFocusVisualElement"
                         Width="16"
                         IsHitTestVisible="false"
                         Opacity="0"
                         Stroke="{StaticResource HoverBrush}"
                         StrokeThickness="1"
                         RadiusX="2"
                         RadiusY="2"/>
                        </Grid>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Margin="{TemplateBinding Padding}"
                              x:Name="contentPresenter"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Grid.Column="1"
                              Content="{TemplateBinding Content}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--RadioButton-->
    <Style TargetType="RadioButton">
        <Setter Property="Background"
            Value="{StaticResource NormalBrush}"/>
        <Setter Property="Foreground"
            Value="Black" />
        <Setter Property="HorizontalContentAlignment"
            Value="Left"/>
        <Setter Property="VerticalContentAlignment"
            Value="Top"/>
        <Setter Property="Padding"
            Value="4,1,0,0"/>
        <Setter Property="BorderThickness"
            Value="2"/>
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="16"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="MouseOver"/>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="Pressed"/>
                                    <VisualTransition From="Normal"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="MouseOver"/>
                                    <VisualTransition From="MouseOver"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Normal"/>
                                    <VisualTransition From="Pressed"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="MouseOver"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundOverlay"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.35"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="Background"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="0.7"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Checked"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Unchecked"/>
                                    <VisualTransition From="Unchecked"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="Checked"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="CheckIcon"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="CheckIcon"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid HorizontalAlignment="Left"
                  VerticalAlignment="Top">
                            <Ellipse Height="14"
                       Margin="1"
                       x:Name="Background"
                       Width="14"
                       Fill="{StaticResource NormalBrush}"
                       Stroke="{TemplateBinding BorderBrush}"
                       StrokeThickness="{TemplateBinding BorderThickness}"/>
                            <Ellipse Height="12"
                       x:Name="BackgroundOverlay"
                       Width="12"
                       Opacity="0"
                       Fill="#FFC4DBEE"
                       Stroke="#00000000"
                       Margin="2,2,2,2"
                       StrokeThickness="0"/>
                            <Border HorizontalAlignment="Center"
                      VerticalAlignment="Center"
                      Width="6"
                      Height="6"
                      CornerRadius="1,1,1,1"
                      BorderThickness="1,1,1,1"
                      Background="#FFFFFFFF"
                      x:Name="CheckIcon"
                      BorderBrush="{StaticResource CheckIconBrush}"
                      Opacity="0"/>
                            <Ellipse Height="14"
                       x:Name="DisabledVisualElement"
                       Width="14"
                       Opacity="0"
                       Fill="{StaticResource DisabledBackgroundBrush}"/>
                            <Ellipse Height="16"
                       x:Name="ContentFocusVisualElement"
                       Width="16"
                       IsHitTestVisible="false"
                       Opacity="0"
                       Stroke="{StaticResource HoverBrush}"
                       StrokeThickness="1"/>
                        </Grid>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Margin="{TemplateBinding Padding}"
                              x:Name="contentPresenter"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Grid.Column="1"
                              Content="{TemplateBinding Content}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--ScrollBar-->
    <Style  TargetType="ScrollBar">
        <Setter Property="MinWidth"
            Value="17" />
        <Setter Property="MinHeight"
            Value="17" />
        <Setter Property="IsTabStop"
            Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <ControlTemplate x:Key="RepeatButtonTemplate"
                               TargetType="RepeatButton">
                                <Grid x:Name="Root"
                      Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalIncrementTemplate"
                               TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="MouseOver" />
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="Pressed" />
                                                <VisualTransition From="Normal"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="Normal" />
                                                <VisualTransition From="Pressed"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>

                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="0.7" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="0.65" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background"
                             Fill="{StaticResource NormalBrush}"
                             StrokeThickness="2"
                             RadiusX="2"
                             RadiusY="2"
                             Stroke="{StaticResource NormalBorderBrush}" />
                                    <Rectangle x:Name="BackgroundAnimation"
                             Opacity="0"
                             Fill="{StaticResource HoverBrush}"
                             Stroke="{x:Null}"
                             StrokeThickness="0"
                             RadiusX="1"
                             RadiusY="1"
                             Margin="2,2,2,2" />
                                    <Path Height="8"
                        Width="4"
                        Stretch="Uniform"
                        Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FFFFFFFF"
                                       x:Name="ButtonColor" />
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement"
                             Opacity="0"
                             Fill="{StaticResource DisabledBackgroundBrush}"
                             RadiusX="3"
                             RadiusY="3" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalDecrementTemplate"
                               TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="MouseOver" />
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="Pressed" />
                                                <VisualTransition From="Normal"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="Normal" />
                                                <VisualTransition From="Pressed"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="0.7" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="0.65" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background"
                             Fill="{StaticResource NormalBrush}"
                             StrokeThickness="2"
                             RadiusX="2"
                             RadiusY="2"
                             Stroke="{StaticResource NormalBorderBrush}" />
                                    <Rectangle x:Name="BackgroundMouseOver"
                             Opacity="0"
                             Fill="{StaticResource HoverBrush}"
                             Stroke="{x:Null}"
                             StrokeThickness="0"
                             RadiusX="1"
                             RadiusY="1"
                             Margin="2,2,2,2" />
                                    <Path Height="8"
                        Width="4"
                        Stretch="Uniform"
                        Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FFFFFFFF"
                                       x:Name="ButtonColor" />
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement"
                             Opacity="0"
                             Fill="{StaticResource DisabledBackgroundBrush}"
                             RadiusX="3"
                             RadiusY="3" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalIncrementTemplate"
                               TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="MouseOver" />
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="Pressed" />
                                                <VisualTransition From="Normal"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="Normal" />
                                                <VisualTransition From="Pressed"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="0.7" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="0.65" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background"
                             Fill="{StaticResource NormalBrush}"
                             StrokeThickness="2"
                             RadiusX="2"
                             RadiusY="2"
                             Stroke="{StaticResource NormalBorderBrush}" />
                                    <Rectangle x:Name="BackgroundMouseOver"
                             Opacity="0"
                             Fill="{StaticResource HoverBrush}"
                             Stroke="{x:Null}"
                             RadiusX="1"
                             RadiusY="1"
                             StrokeThickness="0"
                             Margin="2,2,2,2" />
                                    <Path Height="4"
                        Width="8"
                        Stretch="Uniform"
                        Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FFFFFFFF"
                                       x:Name="ButtonColor" />
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement"
                             Opacity="0"
                             Fill="{StaticResource DisabledBackgroundBrush}"
                             RadiusX="3"
                             RadiusY="3" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalDecrementTemplate"
                               TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="MouseOver" />
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="Pressed" />
                                                <VisualTransition From="Normal"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="Normal" />
                                                <VisualTransition From="Pressed"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                         Duration="00:00:00.0010000"
                                                         Storyboard.TargetName="Background"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                  Value="0.7" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="0.65" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background"
                             Fill="{StaticResource NormalBrush}"
                             StrokeThickness="2"
                             RadiusX="2"
                             RadiusY="2"
                             Stroke="{StaticResource NormalBorderBrush}" />
                                    <Rectangle x:Name="BackgroundMouseOver"
                             Fill="{StaticResource HoverBrush}"
                             Stroke="{x:Null}"
                             RadiusX="1"
                             RadiusY="1"
                             Margin="2,2,2,2"
                             Opacity="1" />
                                    <Path Height="4"
                        Width="8"
                        Stretch="Uniform"
                        Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FFFFFFFF"
                                       x:Name="ButtonColor" />
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement"
                             Opacity="0"
                             Fill="{StaticResource DisabledBackgroundBrush}"
                             RadiusX="3"
                             RadiusY="3" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalThumbTemplate"
                               TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="MouseOver" />
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="Pressed" />
                                                <VisualTransition From="Normal"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="Normal" />
                                                <VisualTransition From="Pressed"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                         Duration="00:00:00.0010000"
                                                         Storyboard.TargetName="BackgroundMouseOver"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                  Value="0" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                         Duration="00:00:00.0010000"
                                                         Storyboard.TargetName="Background"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                  Value="0.7" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="0" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid Margin="1,0,1,0"
                        x:Name="ThumbVisual">
                                        <Rectangle x:Name="Background"
                               Fill="{StaticResource NormalBrush}"
                               StrokeThickness="2"
                               RadiusX="2"
                               RadiusY="2"
                               Stroke="{StaticResource NormalBorderBrush}" />
                                        <Rectangle x:Name="BackgroundMouseOver"
                               Fill="{StaticResource HoverBrush}"
                               Stroke="{x:Null}"
                               StrokeThickness="1"
                               RadiusX="1"
                               RadiusY="1"
                               Margin="2,2,2,2" />
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalThumbTemplate"
                               TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="MouseOver" />
                                                <VisualTransition GeneratedDuration="0:0:0.1"
                                              To="Pressed" />
                                                <VisualTransition From="Normal"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="Normal" />
                                                <VisualTransition From="Pressed"
                                              GeneratedDuration="00:00:00.5000000"
                                              To="MouseOver" />
                                                <VisualTransition From="MouseOver"
                                              GeneratedDuration="00:00:00.3000000"
                                              To="Pressed" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="1" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                         Duration="00:00:00.0010000"
                                                         Storyboard.TargetName="Background"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                  Value="0.7" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual"
                                                         Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0"
                                                  Value="0" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid Margin="0,1,0,1"
                        x:Name="ThumbVisual">
                                        <Rectangle x:Name="Background"
                               Fill="{StaticResource NormalBrush}"
                               StrokeThickness="2"
                               RadiusX="2"
                               RadiusY="2"
                               Stroke="{StaticResource NormalBorderBrush}" />
                                        <Rectangle x:Name="BackgroundMouseOver"
                               Opacity="0"
                               Fill="{StaticResource HoverBrush}"
                               Stroke="{x:Null}"
                               StrokeThickness="0"
                               RadiusX="1"
                               RadiusY="1"
                               Margin="2,2,2,2" />
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="HorizontalRoot" Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Rectangle Grid.ColumnSpan="3"
                         Stroke="#00000000"
                         StrokeThickness="1"
                         RadiusX="3"
                         RadiusY="3"
                         Fill="#FFDDDEDF" />
                            <RepeatButton IsTabStop="False"
                            Template="{StaticResource HorizontalDecrementTemplate}"
                            Margin="1"
                            x:Name="HorizontalSmallDecrease"
                            Width="16"
                            Grid.Column="0"
                            Interval="50" />



                            <RepeatButton IsTabStop="False"
                            Template="{StaticResource RepeatButtonTemplate}"
                            x:Name="HorizontalLargeDecrease"
                            Width="0"
                            Grid.Column="1"
                            Interval="50" />
                            <Thumb Background="{TemplateBinding Background}"
                     Template="{StaticResource HorizontalThumbTemplate}"
                     MinWidth="18"
                     x:Name="HorizontalThumb"
                     Width="18"
                     Grid.Column="2" />
                            <RepeatButton IsTabStop="False"
                            Template="{StaticResource RepeatButtonTemplate}"
                            x:Name="HorizontalLargeIncrease"
                            Grid.Column="3"
                            Interval="50" />



                            <RepeatButton IsTabStop="False"
                            Template="{StaticResource HorizontalIncrementTemplate}"
                            Margin="1"
                            x:Name="HorizontalSmallIncrease"
                            Width="16"
                            Grid.Column="2"
                            Interval="50" />
                        </Grid>
                        <Grid x:Name="VerticalRoot"
                  Visibility="Visible">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Rectangle Grid.RowSpan="3"
                         Stroke="#00000000"
                         StrokeThickness="1"
                         RadiusX="3"
                         RadiusY="3"
                         Fill="#FFDDDEDF" />
                            <RepeatButton IsTabStop="False"
                            Template="{StaticResource VerticalDecrementTemplate}"
                            Height="16"
                            Margin="1"
                            x:Name="VerticalSmallDecrease"
                            Grid.Row="0"
                            Interval="50" 
                            Command="ScrollBar.LineUpCommand"/>

                            <Track Grid.Row="1" x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="true">
                                <Track.Thumb>
                                    <Thumb MinHeight="18" x:Name="VerticalThumb" Template="{StaticResource VerticalThumbTemplate}" />
                                </Track.Thumb>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Command="ScrollBar.PageDownCommand" Interval="50" />
                                </Track.IncreaseRepeatButton>
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Command="ScrollBar.PageUpCommand" Interval="50" />
                                </Track.DecreaseRepeatButton>
                            </Track>

                            <RepeatButton IsTabStop="False"
                            Template="{StaticResource VerticalIncrementTemplate}"
                            Height="16"
                            Margin="1"
                            x:Name="VerticalSmallIncrease"
                            Grid.Row="2"
                            Interval="50" 
                            Command="ScrollBar.LineDownCommand"/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--ScrollViewer-->
    <Style  TargetType="ScrollViewer">
        <Setter Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter Property="VerticalContentAlignment"
            Value="Top" />
        <Setter Property="Padding"
            Value="4" />
        <Setter Property="BorderThickness"
            Value="1" />
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollViewer">
                    <Border BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  CornerRadius="2">
                        <Grid Background="{TemplateBinding Background}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <ScrollContentPresenter Cursor="{TemplateBinding Cursor}"
                                      Margin="{TemplateBinding Padding}"
                                      x:Name="ScrollContentPresenter"
                                      ContentTemplate="{TemplateBinding ContentTemplate}" />
                            <Rectangle Grid.Column="1"
                         Grid.Row="1"
                         Fill="#FFE9EEF4" />
                            <ScrollBar IsTabStop="False"
                         x:Name="PART_VerticalScrollBar"
                         Width="18"
                         Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                         Grid.Column="1"
                         Grid.Row="0"
                         Orientation="Vertical"
                         ViewportSize="{TemplateBinding ViewportHeight}"
                         Maximum="{TemplateBinding ScrollableHeight}"
                         Minimum="0"
                         Value="{TemplateBinding VerticalOffset}"/>
                            <ScrollBar IsTabStop="False"
                         Height="18"
                         x:Name="PART_HorizontalScrollBar"
                         Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                         Grid.Column="0"
                         Grid.Row="1"
                         Orientation="Horizontal"
                         ViewportSize="{TemplateBinding ViewportWidth}"
                         Maximum="{TemplateBinding ScrollableWidth}"
                         Minimum="0"
                         Value="{TemplateBinding HorizontalOffset}"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--Listbox-->
    <Style  TargetType="ListBox">
        <Setter Property="Padding"
            Value="1"/>
        <Setter Property="Background"
            Value="{StaticResource ShadeBrush}"/>
        <Setter Property="Foreground"
            Value="#FFFFFFff"/>
        <Setter Property="HorizontalContentAlignment"
            Value="Left"/>
        <Setter Property="VerticalContentAlignment"
            Value="Top"/>
        <Setter Property="IsTabStop"
            Value="False"/>
        <Setter Property="BorderThickness"
            Value="1"/>
        <Setter Property="KeyboardNavigation.TabNavigation"
            Value="Once"/>
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" 
            Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" 
            Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" 
            Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBox">
                    <Border BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  CornerRadius="2"
                  Background="{TemplateBinding Background}">
                        <ScrollViewer BorderBrush="Transparent"
                          BorderThickness="0"
                          Padding="{TemplateBinding Padding}"
                          x:Name="ScrollViewer">
                            <ItemsPresenter/>
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--LisboxItem-->
    <Style TargetType="ListBoxItem">
        <Setter Property="Padding"
            Value="3"/>
        <Setter Property="HorizontalContentAlignment"
            Value="Left"/>
        <Setter Property="VerticalContentAlignment"
            Value="Top"/>
        <Setter Property="Background"
            Value="Transparent"/>
        <Setter Property="BorderThickness"
            Value="1"/>
        <Setter Property="KeyboardNavigation.TabNavigation"
            Value="Local"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid Background="{TemplateBinding Background}"
                Margin="1,1,1,1">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Normal"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="MouseOver"/>
                                    <VisualTransition From="MouseOver"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Normal"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="HoverRectangle"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Unselected"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="Selected"/>
                                    <VisualTransition From="Selected"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Unselected"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectedRectangle"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value=".75"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="Background"
                       IsHitTestVisible="False"
                       Fill="{StaticResource SelectedBackgroundBrush}"
                       RadiusX="0"/>
                        <Rectangle x:Name="SelectedRectangle"
                       IsHitTestVisible="False"
                       Opacity="0"
                       Fill="{StaticResource NormalBrush}"
                       RadiusX="0"/>
                        <Rectangle x:Name="HoverRectangle"
                       IsHitTestVisible="False"
                       Fill="{StaticResource HoverBrush}"
                       RadiusX="0"
                       Opacity="0"/>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Margin="{TemplateBinding Padding}"/>
                        <Rectangle x:Name="FocusVisualElement"
                       Visibility="Collapsed"
                       Stroke="{StaticResource HoverBrush}"
                       StrokeThickness="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--TabControl-->
    <Style TargetType="TabControl">
        <Setter Property="IsTabStop"
            Value="False" />
        <Setter Property="Background"
            Value="{StaticResource ShadeBrushTop}" />
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="BorderThickness"
            Value="1" />
        <Setter Property="Padding"
            Value="5" />
        <Setter Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
            Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabControl">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualTop"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualBottom"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualLeft"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualRight"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="TemplateTop"
                  Visibility="Visible">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <TabPanel Margin="2,2,2,-1"
                                                           x:Name="TabPanelTop"
                                                           Canvas.ZIndex="1" 
                                      IsItemsHost="True"/>
                            <Border MinHeight="10"
                      MinWidth="10"
                      Grid.Row="1"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      CornerRadius="0,0,3,3">
                                <ContentPresenter Cursor="{TemplateBinding Cursor}"
                                  HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                  Margin="{TemplateBinding Padding}"
                                  x:Name="PART_SelectedContentHost" 
                                  ContentSource="SelectedContent"
                                  VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                            </Border>
                            <Border x:Name="DisabledVisualTop"
                      IsHitTestVisible="False"
                      Opacity="0"
                      Canvas.ZIndex="1"
                      Grid.Row="1"
                      Grid.RowSpan="2"
                      Background="#8CFFFFFF"
                      CornerRadius="0,0,3,3" />
                        </Grid>
                        <Grid x:Name="TemplateBottom"
                  Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <TabPanel Margin="2,-1,2,2"
                                                           x:Name="TabPanelBottom"
                                                           Canvas.ZIndex="1"
                                                           Grid.Row="1" />
                            <Border MinHeight="10"
                      MinWidth="10"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      CornerRadius="3,3,0,0"
                      Background="{StaticResource ShadeBrushBottom}">
                                <ContentPresenter Cursor="{TemplateBinding Cursor}"
                                  HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                  Margin="{TemplateBinding Padding}"
                                  x:Name="ContentBottom"
                                  VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                            </Border>
                            <Border x:Name="DisabledVisualBottom"
                      IsHitTestVisible="False"
                      Opacity="0"
                      Canvas.ZIndex="1"
                      Background="#8CFFFFFF"
                      CornerRadius="3,3,0,0" />
                        </Grid>
                        <Grid x:Name="TemplateLeft"
                  Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <TabPanel Margin="2,2,-1,2"
                                                           x:Name="TabPanelLeft"
                                                           Canvas.ZIndex="1" />
                            <Border MinHeight="10"
                      MinWidth="10"
                      Grid.Column="1"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      CornerRadius="0,3,3,0"
                      Background="{StaticResource ShadeBrushLeft}">
                                <ContentPresenter Cursor="{TemplateBinding Cursor}"
                                  HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                  Margin="{TemplateBinding Padding}"
                                  x:Name="ContentLeft"
                                  VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                            </Border>
                            <Border x:Name="DisabledVisualLeft"
                      IsHitTestVisible="False"
                      Opacity="0"
                      Canvas.ZIndex="1"
                      Grid.Column="1"
                      Background="#8CFFFFFF"
                      CornerRadius="0,3,3,0" />
                        </Grid>
                        <Grid x:Name="TemplateRight"
                  Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <TabPanel Margin="-1,2,2,2"
                                                           x:Name="TabPanelRight"
                                                           Canvas.ZIndex="1"
                                                           Grid.Column="1" />
                            <Border MinHeight="10"
                      MinWidth="10"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      CornerRadius="3,0,0,3"
                      Background="{StaticResource ShadeBrushRight}">
                                <ContentPresenter Cursor="{TemplateBinding Cursor}"
                                  HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                  Margin="{TemplateBinding Padding}"
                                  x:Name="ContentRight"
                                  VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                            </Border>
                            <Border Margin="0"
                      x:Name="DisabledVisualRight"
                      IsHitTestVisible="False"
                      Opacity="0"
                      Canvas.ZIndex="1"
                      Background="#8CFFFFFF"
                      CornerRadius="3,0,0,3" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--TabControlItem-->
    <Style TargetType="TabItem">
        <Setter Property="IsTabStop"
            Value="False" />
        <Setter Property="Background"
            Value="{StaticResource SelectedBackgroundBrush}" />
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="BorderThickness"
            Value="1" />
        <Setter Property="Padding"
            Value="6,2,6,2" />
        <Setter Property="HorizontalContentAlignment"
            Value="Stretch" />
        <Setter Property="VerticalContentAlignment"
            Value="Stretch" />
        <Setter Property="MinWidth"
            Value="5" />
        <Setter Property="MinHeight"
            Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TabItem">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                    <VisualTransition GeneratedDuration="0:0:0.1"
                                        To="MouseOver" />
                                    <VisualTransition From="Normal"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="MouseOver" />
                                    <VisualTransition From="MouseOver"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Normal" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                   Duration="00:00:00.001"
                                                   Storyboard.TargetName="FocusVisualTop"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                   Duration="00:00:00.001"
                                                   Storyboard.TargetName="FocusVisualBottom"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                   Duration="00:00:00.001"
                                                   Storyboard.TargetName="FocusVisualLeft"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                   Duration="00:00:00.001"
                                                   Storyboard.TargetName="FocusVisualRight"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="TopSelectedHoverRectangle"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="TopUnselectedHoverRectangle"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="rectangle"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="BottomUnselectedHoverRectangle"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="rectangle1"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="rectangle2"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="rectangle3"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="rectangle4"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualTopSelected"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualTopUnSelected"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualBottomSelected"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualBottomUnSelected"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualLeftSelected"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualLeftUnSelected"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualRightSelected"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualRightUnSelected"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected">
                                    <Storyboard />
                                </VisualState>
                                <VisualState x:Name="Selected">
                                    <Storyboard />
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="TemplateTopSelected"
                  Visibility="Visible"
                  Canvas.ZIndex="1"
                  Margin="2,0,2,0">
                            <Border Margin="-2,-2,-2,0"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="2,2,2,0"
                      CornerRadius="3,3,0,0">
                                <Border BorderBrush="{x:Null}"
                        CornerRadius="2.4,2.4,0,0"
                        Background="{StaticResource NormalBrush}">
                                    <Grid>
                                        <Rectangle Fill="{StaticResource HoverBrush}"
                               x:Name="TopSelectedHoverRectangle"
                               Opacity="0" />

                                        <ContentPresenter HorizontalAlignment="Center" Margin="12,2,12,2" x:Name="ContentSite" VerticalAlignment="Center" RecognizesAccessKey="True" ContentSource="Header"/>
                                        
<!--                                        <ContentControl FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsTabStop="False"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    x:Name="HeaderTopSelected"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
-->                                        
                                    </Grid>
                                </Border>
                            </Border>
                            <Border Margin="-2,-2,-2,0"
                      x:Name="FocusVisualTop"
                      IsHitTestVisible="false"
                      Visibility="Collapsed"
                      BorderBrush="{StaticResource HoverBrush}"
                      BorderThickness="2,2,2,0"
                      CornerRadius="3,3,0,0" />
                            <Border Margin="-2,-2,-2,0"
                      x:Name="DisabledVisualTopSelected"
                      IsHitTestVisible="false"
                      Opacity="0"
                      Background="{StaticResource DisabledBackgroundBrush}"
                      CornerRadius="3,3,0,0" />
                        </Grid>
                        <Grid x:Name="TemplateTopUnselected"
                  Visibility="Collapsed"
                  Margin="1,0,1,0">
                            <Border x:Name="BorderTop"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="1"
                      CornerRadius="3,3,0,0">
                                <Border x:Name="GradientTop"
                        BorderBrush="#FFFFFFFF"
                        CornerRadius="1,1,0,0"
                        Background="{x:Null}">
                                    <Grid>
                                        <Rectangle Fill="{StaticResource HoverBrush}"
                               x:Name="TopUnselectedHoverRectangle"
                               Opacity="0"
                               Height="Auto"
                               HorizontalAlignment="Stretch"
                               VerticalAlignment="Stretch"
                               Width="Auto" />
                                        <ContentControl FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsTabStop="False"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    x:Name="HeaderTopUnselected"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Border x:Name="DisabledVisualTopUnSelected"
                      IsHitTestVisible="false"
                      Opacity="0"
                      Background="{StaticResource DisabledBackgroundBrush}"
                      CornerRadius="3,3,0,0" />
                        </Grid>
                        <Grid x:Name="TemplateBottomSelected"
                  Visibility="Collapsed"
                  Canvas.ZIndex="1"
                  Margin="2,0,2,0">
                            <Border Margin="-2,0,-2,-2"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="2,0,2,2"
                      CornerRadius="0,0,3,3">
                                <Border BorderBrush="{x:Null}"
                        CornerRadius="0,0,2.4,2.4"
                        Background="{StaticResource NormalBrush}">
                                    <Grid>
                                        <Rectangle Margin="0,0,0,0"
                               Fill="{StaticResource HoverBrush}"
                               Opacity="0"
                               x:Name="rectangle" />
                                        <ContentControl FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsTabStop="False"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    x:Name="HeaderBottomSelected"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Border Margin="-2,0,-2,-2"
                      x:Name="FocusVisualBottom"
                      IsHitTestVisible="false"
                      Visibility="Collapsed"
                      BorderBrush="{StaticResource HoverBrush}"
                      BorderThickness="2,0,2,2"
                      CornerRadius="0,0,3,3" />
                            <Border Margin="-2,0,-2,-2"
                      x:Name="DisabledVisualBottomSelected"
                      IsHitTestVisible="false"
                      Opacity="0"
                      Background="{StaticResource DisabledBackgroundBrush}"
                      CornerRadius="0,0,3,3" />
                        </Grid>
                        <Grid x:Name="TemplateBottomUnselected"
                  Visibility="Collapsed"
                  Margin="1,0,1,0">
                            <Border x:Name="BorderBottom"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="1"
                      CornerRadius="0,0,3,3">
                                <Border x:Name="GradientBottom"
                        BorderBrush="{x:Null}"
                        CornerRadius="0,0,1,1"
                        Background="{x:Null}">
                                    <Grid>
                                        <Rectangle Fill="{StaticResource HoverBrush}"
                               x:Name="BottomUnselectedHoverRectangle"
                               Opacity="0"
                               Height="Auto"
                               HorizontalAlignment="Stretch"
                               VerticalAlignment="Stretch"
                               Width="Auto" />
                                        <ContentControl FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsTabStop="False"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    x:Name="HeaderBottomUnselected"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Border x:Name="DisabledVisualBottomUnSelected"
                      IsHitTestVisible="false"
                      Opacity="0"
                      Background="{StaticResource DisabledBackgroundBrush}"
                      CornerRadius="0,0,3,3" />
                        </Grid>
                        <Grid x:Name="TemplateLeftSelected"
                  Visibility="Collapsed"
                  Canvas.ZIndex="1"
                  Margin="0,3,0,3">
                            <Border Margin="-2,-2,0,-2"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="2,2,0,2"
                      CornerRadius="3,0,0,3">
                                <Border BorderBrush="{x:Null}"
                        BorderThickness="0,0,0,0"
                        CornerRadius="1,0,0,1"
                        Background="{StaticResource NormalBrush}">
                                    <Grid>
                                        <Rectangle Fill="{StaticResource HoverBrush}"
                               Opacity="0"
                               x:Name="rectangle1" />
                                        <ContentControl FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsTabStop="False"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    x:Name="HeaderLeftSelected"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Border Margin="-2,-2,0,-2"
                      x:Name="FocusVisualLeft"
                      IsHitTestVisible="false"
                      Visibility="Collapsed"
                      BorderBrush="{StaticResource HoverBrush}"
                      BorderThickness="2,2,0,2"
                      CornerRadius="3,0,0,3" />
                            <Border Margin="-2,-2,0,-2"
                      x:Name="DisabledVisualLeftSelected"
                      IsHitTestVisible="false"
                      Opacity="0"
                      Background="{StaticResource DisabledBackgroundBrush}"
                      CornerRadius="3,0,0,3" />
                        </Grid>
                        <Grid x:Name="TemplateLeftUnselected"
                  Visibility="Collapsed"
                  Margin="0,1,0,1">
                            <Border x:Name="BorderLeft"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      CornerRadius="3,0,0,3">
                                <Border x:Name="GradientLeft"
                        BorderBrush="{x:Null}"
                        CornerRadius="1,0,0,1"
                        Background="{x:Null}">
                                    <Grid>
                                        <Rectangle Fill="{StaticResource HoverBrush}"
                               Opacity="0"
                               Height="Auto"
                               HorizontalAlignment="Stretch"
                               VerticalAlignment="Stretch"
                               Width="Auto"
                               x:Name="rectangle2" />
                                        <ContentControl FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsTabStop="False"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    x:Name="HeaderLeftUnselected"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Border x:Name="DisabledVisualLeftUnSelected"
                      IsHitTestVisible="false"
                      Opacity="0"
                      Background="{StaticResource DisabledBackgroundBrush}"
                      CornerRadius="3,0,0,3" />
                        </Grid>
                        <Grid x:Name="TemplateRightSelected"
                  Visibility="Collapsed"
                  Canvas.ZIndex="1"
                  Margin="0,3,0,3">
                            <Border Margin="0,-2,-2,-2"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="0,2,2,2"
                      CornerRadius="0,3,3,0">
                                <Border BorderBrush="{x:Null}"
                        CornerRadius="0,3,3,0"
                        Background="{StaticResource NormalBrush}">
                                    <Grid>
                                        <Rectangle Margin="-2,0,0,0"
                               Fill="{StaticResource HoverBrush}"
                               Opacity="0"
                               x:Name="rectangle3" />
                                        <ContentControl FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsTabStop="False"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    x:Name="HeaderRightSelected"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Border Margin="0,-2,-2,-2"
                      x:Name="FocusVisualRight"
                      IsHitTestVisible="false"
                      Visibility="Collapsed"
                      BorderBrush="{StaticResource HoverBrush}"
                      BorderThickness="0,1,1,1"
                      CornerRadius="0,3,3,0" />
                            <Border Margin="0,-2,-2,-2"
                      x:Name="DisabledVisualRightSelected"
                      IsHitTestVisible="false"
                      Opacity="0"
                      Background="{StaticResource DisabledBackgroundBrush}"
                      CornerRadius="0,3,3,0" />
                        </Grid>
                        <Grid x:Name="TemplateRightUnselected"
                  Visibility="Collapsed"
                  Margin="0,1,0,1">
                            <Border x:Name="BorderRight"
                      Background="{TemplateBinding Background}"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="1"
                      CornerRadius="0,3,3,0">
                                <Border x:Name="GradientRight"
                        BorderBrush="{x:Null}"
                        CornerRadius="0,1,1,0"
                        Background="{x:Null}">
                                    <Grid>
                                        <Rectangle Fill="{StaticResource HoverBrush}"
                               Opacity="0"
                               Height="Auto"
                               VerticalAlignment="Stretch"
                               x:Name="rectangle4" />
                                        <ContentControl FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    IsTabStop="False"
                                    Cursor="{TemplateBinding Cursor}"
                                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    x:Name="HeaderRightUnselected"
                                    VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                    </Grid>
                                </Border>
                            </Border>
                            <Border x:Name="DisabledVisualRightUnSelected"
                      IsHitTestVisible="false"
                      Opacity="0"
                      Background="{StaticResource DisabledBackgroundBrush}"
                      CornerRadius="0,3,3,0" />
                        </Grid>
                        <Border Margin="-1"
                    x:Name="FocusVisualElement"
                    IsHitTestVisible="false"
                    Visibility="Collapsed"
                    BorderBrush="#FF6DBDD1"
                    BorderThickness="1"
                    CornerRadius="3,3,0,0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
            Value="#FFFFFFFF" />
    </Style>
    <!--ComboBoxItem-->
    <Style  TargetType="ComboBoxItem">
        <Setter Property="Padding"
            Value="3"/>
        <Setter Property="HorizontalContentAlignment"
            Value="Left"/>
        <Setter Property="VerticalContentAlignment"
            Value="Top"/>
        <Setter Property="Background"
            Value="Transparent"/>
        <Setter Property="BorderThickness"
            Value="1"/>
        <Setter Property="KeyboardNavigation.TabNavigation"
            Value="Local"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBoxItem">
                    <Grid Background="{TemplateBinding Background}"
                Margin="1,1,1,1">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Normal"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="MouseOver"/>
                                    <VisualTransition From="MouseOver"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Normal"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="HoverRectangle"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Unselected"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="Selected"/>
                                    <VisualTransition From="Selected"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Unselected"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="SelectedRectangle"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="Background"
                       IsHitTestVisible="False"
                       Fill="{StaticResource SelectedBackgroundBrush}"
                       RadiusX="1"
                       RadiusY="1"/>
                        <Rectangle x:Name="HoverRectangle"
                       IsHitTestVisible="False"
                       Opacity="0"
                       Fill="{StaticResource HoverBrush}"
                       RadiusX="1"
                       RadiusY="1"/>
                        <Rectangle x:Name="SelectedRectangle"
                       IsHitTestVisible="False"
                       Opacity="0"
                       Fill="{StaticResource NormalBrush}"
                       RadiusX="1"
                       RadiusY="1"/>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Margin="{TemplateBinding Padding}"/>
                        <Rectangle x:Name="FocusVisualElement"
                       Visibility="Collapsed"
                       Stroke="{StaticResource HoverBrush}"
                       StrokeThickness="1"
                       RadiusX="1"
                       RadiusY="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
            Value="#FFFFFFFF"/>
    </Style>
    <!--ComboBox-->
    <Style  TargetType="ComboBox">
        <Setter Property="Padding"
            Value="6,2,25,2"/>
        <Setter Property="Background"
            Value="{StaticResource NormalBrush}"/>
        <Setter Property="HorizontalContentAlignment"
            Value="Left"/>
        <Setter Property="BorderThickness"
            Value="2"/>
        <Setter Property="KeyboardNavigation.TabNavigation"
            Value="Once"/>
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBox">
                    <Grid>
                        <Grid.Resources>
                            <Style TargetType="ToggleButton"
                     x:Name="comboToggleStyle">
                                <Setter Property="Foreground"
                        Value="#FF000000"/>
                                <Setter Property="Background"
                        Value="{StaticResource NormalBrush}"/>
                                <Setter Property="BorderBrush"
                        Value="{StaticResource NormalBorderBrush}" />
                                <Setter Property="BorderThickness"
                        Value="2"/>
                                <Setter Property="Padding"
                        Value="1"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ToggleButton">
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition />
                                                    <ColumnDefinition Width="20" />
                                                </Grid.ColumnDefinitions>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualStateGroup.Transitions>
                                                            <VisualTransition GeneratedDuration="00:00:00.1"
                                                    To="MouseOver"/>
                                                            <VisualTransition GeneratedDuration="00:00:00.1"
                                                    To="Pressed"/>
                                                            <VisualTransition From="Normal"
                                                    GeneratedDuration="00:00:00.3000000"
                                                    To="MouseOver"/>
                                                            <VisualTransition From="MouseOver"
                                                    GeneratedDuration="00:00:00.5000000"
                                                    To="Normal"/>
                                                            <VisualTransition From="Pressed"
                                                    GeneratedDuration="00:00:00.5000000"
                                                    To="MouseOver"/>
                                                            <VisualTransition From="MouseOver"
                                                    GeneratedDuration="00:00:00.3000000"
                                                    To="Pressed"/>
                                                        </VisualStateGroup.Transitions>
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                               Duration="00:00:00.0010000"
                                                               Storyboard.TargetName="HoverRectangle"
                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                        Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                               Duration="00:00:00.0010000"
                                                               Storyboard.TargetName="Background"
                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                        Value="0.7"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                        Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="CheckStates">
                                                        <VisualState x:Name="Checked">
                                                            <Storyboard/>
                                                        </VisualState>
                                                        <VisualState x:Name="Unchecked"/>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle x:Name="Background"
                                   Fill="{TemplateBinding Background}"
                                   Stroke="{TemplateBinding BorderBrush}"
                                   StrokeThickness="2"
                                   RadiusX="3"
                                   RadiusY="3"
                                   Grid.ColumnSpan="2"/>
                                                <Rectangle x:Name="HoverRectangle"
                                   Opacity="0"
                                   Fill="{StaticResource HoverBrush}"
                                   Stroke="{x:Null}"
                                   StrokeThickness="{TemplateBinding BorderThickness}"
                                   RadiusX="2"
                                   RadiusY="2"
                                   Grid.ColumnSpan="2"
                                   Grid.Column="1"
                                   Margin="-4,2,2,2"/>
                                                <Rectangle x:Name="BackgroundOverlay2"
                                   Fill="#FFFFFFFF"
                                   Stroke="#00000000"
                                   RadiusX="2"
                                   RadiusY="2"
                                   Margin="1.45000004768372,1,0,1"/>
                                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Margin="{TemplateBinding Padding}"
                                          x:Name="contentPresenter"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          Grid.Column="1"
                                          Grid.Row="9"/>
                                                <Rectangle x:Name="DisabledVisualElement"
                                   IsHitTestVisible="false"
                                   Opacity="0"
                                   Fill="#A5FFFFFF"
                                   RadiusX="3"
                                   RadiusY="3"/>
                                                <Rectangle x:Name="FocusVisualElement"
                                   IsHitTestVisible="false"
                                   Visibility="Collapsed"
                                   Stroke="{StaticResource NormalBrush}"
                                   StrokeThickness="1"
                                   RadiusX="3.5"
                                   RadiusY="3.5"
                                   Grid.ColumnSpan="2"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="0.65"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="ContentPresenterBorder">
                            <Grid>
                                <ToggleButton Background="{TemplateBinding Background}"
                              BorderBrush="{TemplateBinding BorderBrush}"
                              BorderThickness="{TemplateBinding BorderThickness}"
                              HorizontalContentAlignment="Right"
                              HorizontalAlignment="Stretch"
                              x:Name="DropDownToggle"
                              Style="{DynamicResource comboToggleStyle}"
                              VerticalAlignment="Stretch"
                              IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                                    <Path Height="4"
                        HorizontalAlignment="Right"
                        Margin="0,0,6,0"
                        x:Name="BtnArrow"
                        Width="8"
                        Stretch="Uniform"
                        Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FF333333"
                                       x:Name="BtnArrowColor"/>
                                        </Path.Fill>
                                    </Path>
                                </ToggleButton>
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                  Margin="{TemplateBinding Padding}"
                                  x:Name="ContentPresenter"
                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                  Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False">
                                </ContentPresenter>
                            </Grid>
                        </Border>
                        <Rectangle x:Name="DisabledVisualElement"
                       IsHitTestVisible="false"
                       Fill="{StaticResource DisabledBackgroundBrush}"
                       RadiusX="4"
                       RadiusY="4"
                       Opacity="0"
                       StrokeThickness="0"/>
                        <Rectangle x:Name="FocusVisualElement"
                       IsHitTestVisible="false"
                       Opacity="0"
                       Stroke="{StaticResource HoverBrush}"
                       StrokeThickness="1"
                       RadiusX="3"
                       RadiusY="3"/>
                        <Popup x:Name="Popup" IsOpen="{TemplateBinding IsDropDownOpen}">
                            <Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">

                                <Border Height="Auto"
                      HorizontalAlignment="Stretch"
                      x:Name="PopupBorder"
                      BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}"
                      CornerRadius="3"
                      Background="{StaticResource ShadeBrush}">
                                    <ScrollViewer BorderThickness="0"                                             
                                              Padding="1" 
                                              SnapsToDevicePixels="True" 
                                              HorizontalScrollBarVisibility="Auto" 
                                              VerticalScrollBarVisibility="Auto" 
                                              CanContentScroll="True">
                                        <ItemsPresenter/>
                                    </ScrollViewer>
                                </Border>

                            </Grid>
                        </Popup>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
            Value="#FF000000"/>
    </Style>
    <!--Textbox-->
    <Style TargetType="TextBox">
        <Setter Property="BorderThickness"
            Value="1"/>
        <Setter Property="Background"
            Value="{StaticResource ShadeBrush}"/>
        <Setter Property="Foreground"
            Value="#FF000000"/>
        <Setter Property="Padding"
            Value="2"/>
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Grid >
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="MouseOver"/>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="ReadOnly"/>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="Disabled"/>
                                    <VisualTransition From="Normal"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="MouseOver"/>
                                    <VisualTransition From="MouseOver"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Normal"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="HoverBorder"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.6"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ReadOnlyVisualElement"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border"
                    Opacity="1"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2,2,2,2">
                            <Grid>
                                <Border x:Name="ReadOnlyVisualElement"
                        Opacity="0"
                        Background="#72F7F7F7"/>
                                <Border BorderThickness="1"
                        CornerRadius="1,1,1,1">
                                    <Border.BorderBrush>
                                        <SolidColorBrush Color="Transparent"
                                     x:Name="MouseOverColor"/>
                                    </Border.BorderBrush>
                                    <ScrollViewer BorderThickness="0"
                                IsTabStop="False"
                                Padding="{TemplateBinding Padding}"
                                x:Name="PART_ContentHost"/>
                                </Border>
                            </Grid>
                        </Border>
                        <Border x:Name="HoverBorder"
                    Opacity="0"
                    BorderBrush="{StaticResource NormalBrush}"
                    BorderThickness="2,2,2,2"
                    CornerRadius="2,2,2,2"/>
                        <Border x:Name="DisabledVisualElement"
                    IsHitTestVisible="False"
                    Opacity="0"
                    Background="#FFFFFFFF"
                    BorderBrush="#A5F7F7F7"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2,2,2,2"/>
                        <Border Margin="1"
                    x:Name="FocusVisualElement"
                    IsHitTestVisible="False"
                    Opacity="0"
                    BorderBrush="{StaticResource NormalBrush}"
                    BorderThickness="2.1,2.1,2.1,2.1"
                    CornerRadius="0.2,0.2,0.2,0.2"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--ProgressBar-->
    <Style TargetType="ProgressBar">
        <Setter Property="Foreground"
            Value="{StaticResource NormalBrush}"/>
        <Setter Property="Background"
            Value="{StaticResource SelectedBackgroundBrush}"/>
        <Setter Property="BorderThickness"
            Value="2"/>
        <Setter Property="Maximum"
            Value="100"/>
        <Setter Property="IsTabStop"
            Value="False"/>
        <Setter Property="BorderBrush"
            Value="{StaticResource DisabledBackgroundBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <Grid x:Name="Root">
                        <Border x:Name="PART_Track"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="6,6,6,6"/>
                        <Grid x:Name="ProgressBarRootGrid">
                            <Grid x:Name="IndeterminateRoot"
                    Visibility="Collapsed">
                                <Rectangle Margin="1,1,1,1"
                           x:Name="IndeterminateGradientFill"
                           Opacity="0.7"
                           RadiusX="5"
                           RadiusY="5"
                           StrokeThickness="0">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0,1"
                                         StartPoint="20,1"
                                         MappingMode="Absolute"
                                         SpreadMethod="Repeat">
                                            <LinearGradientBrush.Transform>
                                                <TransformGroup>
                                                    <TranslateTransform X="0"/>
                                                    <SkewTransform AngleX="-30"/>
                                                </TransformGroup>
                                            </LinearGradientBrush.Transform>
                                            <GradientStop Color="#FFFFFFFF"
                                    Offset="0"/>
                                            <GradientStop Color="#00FFFFFF"
                                    Offset=".25"/>
                                            <GradientStop Color="#FFFFFFFF"
                                    Offset="0.85"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                    <Rectangle.OpacityMask>
                                        <LinearGradientBrush EndPoint="0.004,0.465"
                                         StartPoint="0.997,0.422">
                                            <GradientStop Color="#00FFFFFF"/>
                                            <GradientStop Color="#00FFFFFF"
                                    Offset="1"/>
                                            <GradientStop Color="#FFFFFFFF"
                                    Offset="0.486"/>
                                        </LinearGradientBrush>
                                    </Rectangle.OpacityMask>
                                </Rectangle>
                            </Grid>
                            <Grid Margin="1"
                    x:Name="DeterminateRoot">
                                <Rectangle HorizontalAlignment="Left"
                           Margin="1,1,1,1"
                           x:Name="PART_Indicator"
                           Fill="{TemplateBinding Foreground}"
                           StrokeThickness="0.5"
                           RadiusX="5"
                           RadiusY="5"/>
                            </Grid>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsIndeterminate" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard RepeatBehavior="Forever">
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetName="IndeterminateRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetName="DeterminateRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateGradientFill" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:2.4" Value="145" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--Thumb-->
    <Style  TargetType="Thumb">
        <Setter Property="Background"
            Value="{StaticResource NormalBrush}"/>
        <Setter Property="BorderThickness"
            Value="2"/>
        <Setter Property="IsTabStop"
            Value="False"/>
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="MouseOver"/>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="Pressed"/>
                                    <VisualTransition From="Normal"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="MouseOver"/>
                                    <VisualTransition From="MouseOver"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="Normal"/>
                                    <VisualTransition From="Pressed"
                                        GeneratedDuration="00:00:00.5000000"
                                        To="MouseOver"/>
                                    <VisualTransition From="MouseOver"
                                        GeneratedDuration="00:00:00.3000000"
                                        To="Pressed"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="Background"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="0.7"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="Base"
                       RadiusX="5"
                       RadiusY="5"
                       Fill="#FF000000"
                       StrokeThickness="0"/>
                        <Rectangle x:Name="Background"
                       Fill="{TemplateBinding Background}"
                       Stroke="{TemplateBinding BorderBrush}"
                       StrokeThickness="2"
                       RadiusX="4"
                       RadiusY="4"/>
                        <Rectangle x:Name="BackgroundAnimation"
                       Opacity="0"
                       Fill="{StaticResource HoverBrush}"
                       RadiusX="3"
                       RadiusY="3"
                       Margin="2,2,2,2"
                       StrokeThickness="0"/>
                        <Rectangle x:Name="DisabledVisualElement"
                       IsHitTestVisible="false"
                       Opacity="0"
                       Fill="{StaticResource DisabledBackgroundBrush}"
                       RadiusX="5"
                       RadiusY="5"/>
                        <Rectangle x:Name="FocusVisualElement"
                       IsHitTestVisible="false"
                       Visibility="Collapsed"
                       Stroke="{StaticResource HoverBrush}"
                       StrokeThickness="1"
                       RadiusX="4.5"
                       RadiusY="4.5"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--Slider-->
    <Style TargetType="Slider">
        <Setter Property="BorderThickness"
            Value="1"/>
        <Setter Property="Maximum"
            Value="10"/>
        <Setter Property="Minimum"
            Value="0"/>
        <Setter Property="Value"
            Value="0"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1"
                             StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9"
                        Offset="0"/>
                    <GradientStop Color="#FF8399A9"
                        Offset="0.375"/>
                    <GradientStop Color="#FF718597"
                        Offset="0.375"/>
                    <GradientStop Color="#FF617584"
                        Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="IsTabStop"
            Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Slider">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <ControlTemplate x:Key="RepeatButtonTemplate">
                                <Grid x:Name="Root"
                      Opacity="0"
                      Background="Transparent"/>
                            </ControlTemplate>
                            <Style x:Key="SLSliderVerticalThumb"
                     TargetType="Thumb">
                                <Setter Property="Background"
                        Value="{StaticResource NormalBrush}"/>
                                <Setter Property="BorderThickness"
                        Value="1"/>
                                <Setter Property="IsTabStop"
                        Value="False"/>
                                <Setter Property="BorderBrush"
                        Value="{StaticResource NormalBorderBrush}" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Thumb">
                                            <Grid>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualStateGroup.Transitions>
                                                            <VisualTransition GeneratedDuration="00:00:00.1"
                                                    To="MouseOver"/>
                                                            <VisualTransition GeneratedDuration="00:00:00.1"
                                                    To="Pressed"/>
                                                            <VisualTransition From="Normal"
                                                    GeneratedDuration="00:00:00.3000000"
                                                    To="MouseOver"/>
                                                            <VisualTransition From="MouseOver"
                                                    GeneratedDuration="00:00:00.5000000"
                                                    To="Normal"/>
                                                            <VisualTransition From="Pressed"
                                                    GeneratedDuration="00:00:00.5000000"
                                                    To="MouseOver"/>
                                                            <VisualTransition From="MouseOver"
                                                    GeneratedDuration="00:00:00.3000000"
                                                    To="Pressed"/>
                                                        </VisualStateGroup.Transitions>
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                        Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                               Duration="00:00:00.0010000"
                                                               Storyboard.TargetName="Background"
                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                        Value="0.7"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                        Value="0.65"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle x:Name="Base"
                                   RadiusX="5.1"
                                   RadiusY="5.1"
                                   Fill="#FF000000"/>
                                                <Rectangle x:Name="Background"
                                   Fill="{TemplateBinding Background}"
                                   Stroke="{TemplateBinding BorderBrush}"
                                   StrokeThickness="2"
                                   RadiusX="4"
                                   RadiusY="4"/>
                                                <Rectangle Margin="2,2,2,2"
                                   x:Name="BackgroundAnimation"
                                   Opacity="0"
                                   Fill="{StaticResource HoverBrush}"
                                   RadiusX="3"
                                   RadiusY="3"/>
                                                <Rectangle x:Name="DisabledVisualElement"
                                   IsHitTestVisible="false"
                                   Opacity="0"
                                   Fill="{StaticResource DisabledBackgroundBrush}"
                                   RadiusX="5"
                                   RadiusY="5"/>
                                                <Rectangle x:Name="FocusVisualElement"
                                   IsHitTestVisible="false"
                                   Visibility="Collapsed"
                                   Stroke="{StaticResource HoverBrush}"
                                   StrokeThickness="1"
                                   RadiusX="4.5"
                                   RadiusY="4.5"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <Style x:Key="SLSliderHorizontalThumb"
                     TargetType="Thumb">
                                <Setter Property="Background"
                        Value="{StaticResource NormalBrush}"/>
                                <Setter Property="BorderThickness"
                        Value="2"/>
                                <Setter Property="IsTabStop"
                        Value="False"/>
                                <Setter Property="BorderBrush"
                        Value="{StaticResource NormalBorderBrush}" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Thumb">
                                            <Grid>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualStateGroup.Transitions>
                                                            <VisualTransition GeneratedDuration="00:00:00.1"
                                                    To="MouseOver"/>
                                                            <VisualTransition GeneratedDuration="00:00:00.1"
                                                    To="Pressed"/>
                                                            <VisualTransition From="Normal"
                                                    GeneratedDuration="00:00:00.3000000"
                                                    To="MouseOver"/>
                                                            <VisualTransition From="MouseOver"
                                                    GeneratedDuration="00:00:00.5000000"
                                                    To="Normal"/>
                                                            <VisualTransition From="Pressed"
                                                    GeneratedDuration="00:00:00.5000000"
                                                    To="MouseOver"/>
                                                            <VisualTransition From="MouseOver"
                                                    GeneratedDuration="00:00:00.3000000"
                                                    To="Pressed"/>
                                                        </VisualStateGroup.Transitions>
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                        Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                               Duration="00:00:00.0010000"
                                                               Storyboard.TargetName="Background"
                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                        Value="0.7"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                        Value="0.65"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle x:Name="Base"
                                   RadiusX="5"
                                   RadiusY="5"
                                   Fill="#FF000000"
                                   StrokeThickness="0"/>
                                                <Rectangle x:Name="Background"
                                   Fill="{TemplateBinding Background}"
                                   Stroke="{TemplateBinding BorderBrush}"
                                   StrokeThickness="2"
                                   RadiusX="4"
                                   RadiusY="4"/>
                                                <Rectangle x:Name="BackgroundAnimation"
                                   Opacity="0"
                                   Fill="{StaticResource HoverBrush}"
                                   RadiusX="3"
                                   RadiusY="3"
                                   Margin="2,2,2,2"
                                   StrokeThickness="0"/>
                                                <Rectangle x:Name="DisabledVisualElement"
                                   IsHitTestVisible="false"
                                   Opacity="0"
                                   Fill="{StaticResource DisabledBackgroundBrush}"
                                   RadiusX="5"
                                   RadiusY="5"/>
                                                <Rectangle x:Name="FocusVisualElement"
                                   IsHitTestVisible="false"
                                   Visibility="Collapsed"
                                   Stroke="{StaticResource HoverBrush}"
                                   StrokeThickness="1"
                                   RadiusX="4.5"
                                   RadiusY="4.5"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="HorizontalTemplate"
                  Background="{TemplateBinding Background}">
                            <Rectangle Height="5"
                         Margin="5,0,5,0"
                         Fill="{StaticResource SelectedBackgroundBrush}"
                         Stroke="{StaticResource HorizontalSliderBorderBrush}"
                         StrokeThickness="{TemplateBinding BorderThickness}"/>


                            <Track x:Name="PART_Track">
                                <Track.Thumb>
                                    <Thumb IsTabStop="True"
                     Height="13"
                     x:Name="HorizontalThumb"
                     Width="24"
                     Grid.Column="1"
                     Style="{StaticResource SLSliderHorizontalThumb}"
                     Margin="0,0,0,0"/>
                                </Track.Thumb>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Command="Slider.IncreaseLarge" />
                                </Track.IncreaseRepeatButton>
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Command="Slider.DecreaseLarge" />
                                </Track.DecreaseRepeatButton>
                            </Track>


                        </Grid>
                        <Grid x:Name="VerticalTemplate"
                  Visibility="Collapsed"
                  Background="{TemplateBinding Background}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Rectangle Margin="0,5,0,5"
                         Width="5"
                         Grid.Row="0"
                         Grid.RowSpan="3"
                         StrokeThickness="{TemplateBinding BorderThickness}"
                         Fill="{StaticResource SelectedBackgroundBrushVertical}"
                         Stroke="{StaticResource VerticalSliderBorderBrush}"/>
                            <RepeatButton IsTabStop="False"
                            Template="{StaticResource RepeatButtonTemplate}"
                            x:Name="VerticalTrackLargeChangeDecreaseRepeatButton"
                            Grid.Row="2"/>
                            <Thumb IsTabStop="True"
                     Height="24"
                     x:Name="VerticalThumb"
                     Width="13"
                     Grid.Row="1"
                     Style="{StaticResource SLSliderVerticalThumb}"/>
                            <RepeatButton IsTabStop="False"
                            Template="{StaticResource RepeatButtonTemplate}"
                            x:Name="VerticalTrackLargeChangeIncreaseRepeatButton"
                            Grid.Row="0"/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--ToggleButton-->
    <Style  TargetType="ToggleButton">
        <Setter Property="Background"
            Value="{StaticResource SelectedBackgroundBrush}"/>
        <Setter Property="Foreground"
            Value="#FFFFFFFF"/>
        <Setter Property="Padding"
            Value="3"/>
        <Setter Property="BorderThickness"
            Value="2"/>
        <Setter Property="BorderBrush"
            Value="{StaticResource NormalBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="MouseOver"/>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                        To="Pressed"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                   Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                            Value="0.65"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                   Duration="00:00:00.0010000"
                                                   Storyboard.TargetName="CheckedBorder"
                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                            Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="4,4,4,4"
                    Opacity="0.9"/>
                        <Border x:Name="CheckedBorder"
                    Opacity="0"
                    Background="{StaticResource NormalBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="4"/>
                        <Border x:Name="BackgroundAnimation"
                    Opacity="0"
                    Background="#FFFFFFFF"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="4"/>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Margin="{TemplateBinding Padding}"
                              x:Name="contentPresenter"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Content="{TemplateBinding Content}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        <Border x:Name="DisabledVisualElement"
                    IsHitTestVisible="false"
                    Opacity="0"
                    Background="{StaticResource DisabledBackgroundBrush}"
                    CornerRadius="4"/>
                        <Border x:Name="FocusVisualElement"
                    IsHitTestVisible="false"
                    Visibility="Collapsed"
                    BorderBrush="{StaticResource HoverBrush}"
                    BorderThickness="1"
                    CornerRadius="3"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- Expander -->
    <Style TargetType="Expander">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Expander">
                    <Grid Background="Transparent">
                        <Grid.Resources>

                            <Style x:Key="SLExpanderContentControl" TargetType="ContentControl">
                                <Setter Property="Foreground" Value="#FF000000"/>
                                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                                <Setter Property="VerticalContentAlignment" Value="Top"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ContentControl">
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>

                            <LinearGradientBrush x:Key="ExpanderArrowFill" EndPoint="0,1" StartPoint="0,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FFBFBFBF" Offset="0.5"/>
                                <GradientStop Color="#FF878787" Offset="1"/>
                            </LinearGradientBrush>
                            <LinearGradientBrush x:Key="ExpanderArrowHoverFill" EndPoint="0,1" StartPoint="0,0">
                                <GradientStop Color="#FFF0F8FE" Offset="0"/>
                                <GradientStop Color="#FFE0F3FE" Offset="0.3"/>
                                <GradientStop Color="#FF6FA7C5" Offset="1"/>
                            </LinearGradientBrush>
                            <LinearGradientBrush x:Key="ExpanderArrowPressedFill" EndPoint="0,1" StartPoint="0,0">
                                <GradientStop Color="#FFDCF0FA" Offset="0"/>
                                <GradientStop Color="#FFC5E6F7" Offset="0.2"/>
                                <GradientStop Color="#FF5690D0" Offset="1"/>
                            </LinearGradientBrush>
                            <ControlTemplate x:Key="ExpanderDownHeaderTemplate" TargetType="ToggleButton">
                                <Grid Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CheckStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="00:00:00"/>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Checked">
                                                <!--                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="arrow" Storyboard.TargetProperty="Data">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>-->
                                            </VisualState>
                                            <VisualState x:Name="Unchecked"/>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0"/>
                                                <VisualTransition GeneratedDuration="00:00:00.1" To="MouseOver"/>
                                                <VisualTransition GeneratedDuration="00:00:00.1" To="Pressed"/>
                                                <VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/>
                                                <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                <VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver"/>
                                                <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed"/>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FullControlHover" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>

                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>

                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border Padding="{TemplateBinding Padding}" CornerRadius="3,3,3,3" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" Background="#FFFFFFFF">
                                        <Grid Background="Transparent">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="19"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                                <Border Height="19" Width="19" Background="{StaticResource NormalBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" x:Name="Background"/>
                                                <Border Height="19" x:Name="HoverBorder" Width="19" Background="{StaticResource HoverBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" Opacity="0"/>
                                                <Path HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                                    <Path.Stroke>
                                                        <SolidColorBrush Color="Black"/>
                                                    </Path.Stroke>
                                                </Path>
                                            </Grid>
                                            <ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" x:Name="header" VerticalAlignment="Center" Grid.Column="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                        </Grid>
                                    </Border>
                                    <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="{StaticResource HoverBrush}" BorderThickness="2,2,2,2" CornerRadius="3"/>
                                    <Border x:Name="FullControlHover" IsHitTestVisible="false" Visibility="Visible" BorderBrush="{StaticResource NormalBrush}" BorderThickness="2,2,2,2" CornerRadius="3" Opacity="0"/>
                                </Grid>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="IsChecked" Value="True">
                                        <Setter Property="Data" TargetName="arrow" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
                                    </Trigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                            <ControlTemplate x:Key="ExpanderUpHeaderTemplate" TargetType="ToggleButton">
                                <Grid Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CheckStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="00:00:00"/>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Checked">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="arrow" Storyboard.TargetProperty="Data">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unchecked"/>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0"/>
                                                <VisualTransition GeneratedDuration="00:00:00.1" To="MouseOver"/>
                                                <VisualTransition GeneratedDuration="00:00:00.1" To="Pressed"/>
                                                <VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/>
                                                <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                <VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver"/>
                                                <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed"/>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FullControlHover" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border Padding="{TemplateBinding Padding}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" Background="#FFFFFFFF">
                                        <Grid Background="Transparent">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="19"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                                <Grid.RenderTransform>
                                                    <TransformGroup>
                                                        <TransformGroup.Children>
                                                            <TransformCollection>
                                                                <RotateTransform Angle="180" CenterX="9.5" CenterY="9.5"/>
                                                            </TransformCollection>
                                                        </TransformGroup.Children>
                                                    </TransformGroup>
                                                </Grid.RenderTransform>
                                                <Border Height="19" Width="19" Background="{StaticResource NormalBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" x:Name="Background" RenderTransformOrigin="0.5,0.5">
                                                    <Border.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform/>
                                                            <SkewTransform/>
                                                            <RotateTransform Angle="180"/>
                                                            <TranslateTransform/>
                                                        </TransformGroup>
                                                    </Border.RenderTransform>
                                                </Border>
                                                <Border Height="19" x:Name="HoverBorder" Width="19" Background="{StaticResource HoverBrush}" BorderBrush="{x:Null}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" RenderTransformOrigin="0.5,0.5" Opacity="0">
                                                    <Border.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform/>
                                                            <SkewTransform/>
                                                            <RotateTransform Angle="180"/>
                                                            <TranslateTransform/>
                                                        </TransformGroup>
                                                    </Border.RenderTransform>
                                                </Border>
                                                <Path HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                                    <Path.Stroke>
                                                        <SolidColorBrush Color="Black"/>
                                                    </Path.Stroke>
                                                </Path>
                                            </Grid>
                                            <ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" x:Name="header" VerticalAlignment="Center" Grid.Column="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                        </Grid>
                                    </Border>
                                    <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="{StaticResource HoverBrush}" BorderThickness="2,2,2,2" CornerRadius="3"/>
                                    <Border x:Name="FullControlHover" IsHitTestVisible="false" Visibility="Visible" BorderBrush="{StaticResource NormalBrush}" BorderThickness="2,2,2,2" CornerRadius="3" Opacity="0"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="ExpanderLeftHeaderTemplate" TargetType="ToggleButton">
                                <Grid Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CheckStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="00:00:00"/>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Checked">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="arrow" Storyboard.TargetProperty="Data">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unchecked"/>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0"/>
                                                <VisualTransition GeneratedDuration="00:00:00.1" To="MouseOver"/>
                                                <VisualTransition GeneratedDuration="00:00:00.1" To="Pressed"/>
                                                <VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/>
                                                <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                <VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver"/>
                                                <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed"/>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FullControlHover" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border CornerRadius="3,3,3,3" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" Padding="0,2,0,2" Width="38" Background="#FFFFFFFF">
                                        <Grid Background="Transparent">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="19"/>
                                                <RowDefinition Height="*"/>
                                            </Grid.RowDefinitions>
                                            <Grid HorizontalAlignment="Center" VerticalAlignment="Top">
                                                <Grid.RenderTransform>
                                                    <TransformGroup>
                                                        <TransformGroup.Children>
                                                            <TransformCollection>
                                                                <RotateTransform Angle="90" CenterX="9.5" CenterY="9.5"/>
                                                            </TransformCollection>
                                                        </TransformGroup.Children>
                                                    </TransformGroup>
                                                </Grid.RenderTransform>
                                                <Border Height="19" x:Name="Background" Width="19" RenderTransformOrigin="0.5,0.5" Background="{StaticResource NormalBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3">
                                                    <Border.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform/>
                                                            <SkewTransform/>
                                                            <RotateTransform Angle="-90"/>
                                                            <TranslateTransform/>
                                                        </TransformGroup>
                                                    </Border.RenderTransform>
                                                </Border>
                                                <Border Height="19" x:Name="HoverBorder" Width="19" RenderTransformOrigin="0.5,0.5" Background="{StaticResource HoverBrush}" BorderBrush="{x:Null}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" Opacity="0">
                                                    <Border.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform/>
                                                            <SkewTransform/>
                                                            <RotateTransform Angle="-90"/>
                                                            <TranslateTransform/>
                                                        </TransformGroup>
                                                    </Border.RenderTransform>
                                                </Border>
                                                <Path HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                                    <Path.Stroke>
                                                        <SolidColorBrush Color="Black"/>
                                                    </Path.Stroke>
                                                </Path>
                                            </Grid>
                                        </Grid>
                                    </Border>
                                    <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="{StaticResource HoverBrush}" BorderThickness="2,2,2,2" CornerRadius="3"/>
                                    <Border x:Name="FullControlHover" IsHitTestVisible="false" Visibility="Visible" BorderBrush="{StaticResource NormalBrush}" BorderThickness="2,2,2,2" CornerRadius="3" Opacity="0"/>
                                    <ContentPresenter x:Name="header" VerticalAlignment="Top" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" Margin="0,42,0,0" >
                                        <ContentPresenter.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform Angle="90"/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </ContentPresenter.RenderTransform>
                                    </ContentPresenter>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="ExpanderRightHeaderTemplate" TargetType="ToggleButton">
                                <Grid Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CheckStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="00:00:00"/>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Checked">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="arrow" Storyboard.TargetProperty="Data">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unchecked"/>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0"/>
                                                <VisualTransition GeneratedDuration="00:00:00.1" To="MouseOver"/>
                                                <VisualTransition GeneratedDuration="00:00:00.1" To="Pressed"/>
                                                <VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/>
                                                <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                <VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver"/>
                                                <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed"/>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FullControlHover" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>

                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
                                                    </DoubleAnimationUsingKeyFrames>

                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border Padding="{TemplateBinding Padding}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" Width="38" Background="#FFFFFFFF">
                                        <Grid Background="Transparent">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="19"/>
                                                <RowDefinition Height="*"/>
                                            </Grid.RowDefinitions>
                                            <Grid HorizontalAlignment="Center" VerticalAlignment="Top">
                                                <Grid.RenderTransform>
                                                    <TransformGroup>
                                                        <TransformGroup.Children>
                                                            <TransformCollection>
                                                                <RotateTransform Angle="-90" CenterX="9.5" CenterY="9.5"/>
                                                            </TransformCollection>
                                                        </TransformGroup.Children>
                                                    </TransformGroup>
                                                </Grid.RenderTransform>
                                                <Border Background="{StaticResource NormalBrush}" Width="19" Height="19" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" RenderTransformOrigin="0.5,0.5" x:Name="Background">
                                                    <Border.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform/>
                                                            <SkewTransform/>
                                                            <RotateTransform Angle="90"/>
                                                            <TranslateTransform/>
                                                        </TransformGroup>
                                                    </Border.RenderTransform>
                                                </Border>
                                                <Border Height="19" Width="19" RenderTransformOrigin="0.5,0.5" Background="{StaticResource HoverBrush}" BorderBrush="{x:Null}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" Opacity="0" x:Name="HoverBorder">
                                                    <Border.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform/>
                                                            <SkewTransform/>
                                                            <RotateTransform Angle="90"/>
                                                            <TranslateTransform/>
                                                        </TransformGroup>
                                                    </Border.RenderTransform>
                                                </Border>
                                                <Path HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                                    <Path.Stroke>
                                                        <SolidColorBrush Color="Black"/>
                                                    </Path.Stroke>
                                                </Path>
                                            </Grid>
                                        </Grid>
                                    </Border>
                                    <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="{StaticResource HoverBrush}" BorderThickness="1" CornerRadius="3"/>
                                    <Border x:Name="FullControlHover" IsHitTestVisible="false" Visibility="Visible" BorderBrush="{StaticResource NormalBrush}" BorderThickness="2,2,2,2" CornerRadius="3" Opacity="0"/>
                                    <ContentPresenter x:Name="header" VerticalAlignment="Top" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"  RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" Margin="0,42,0,0">
                                        <ContentPresenter.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform Angle="-90"/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </ContentPresenter.RenderTransform>
                                    </ContentPresenter>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpansionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Collapsed"/>
                                <VisualState x:Name="Expanded">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpandDirectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="ExpandDown">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="rd1" Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="cd0" Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="Template">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ExpanderUpHeaderTemplate}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="rd0" Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="cd0" Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="Template">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ExpanderLeftHeaderTemplate}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="rd0" Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="cd0" Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="Template">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ExpanderRightHeaderTemplate}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="1" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="rd0" Storyboard.TargetProperty="Height">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="cd1" Storyboard.TargetProperty="Width">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" Padding="{TemplateBinding Padding}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" x:Name="rd0"/>
                                    <RowDefinition Height="*" x:Name="rd1"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" x:Name="cd0"/>
                                    <ColumnDefinition Width="*" x:Name="cd1"/>
                                </Grid.ColumnDefinitions>
                                <ToggleButton HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1" MinHeight="0" MinWidth="0" x:Name="ExpanderButton" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" Template="{StaticResource ExpanderDownHeaderTemplate}" Grid.Column="0" Grid.Row="0" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Grid.ColumnSpan="2"/>
                                <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="ExpandSite" Visibility="Collapsed">
                                    <Border Background="{StaticResource ShadeBrush}" CornerRadius="3,3,3,3" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="1,1,1,1"/>
                                    <ContentPresenter Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="4,4,4,4" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                </Grid>
                            </Grid>
                        </Border>
                        <Border x:Name="DisabledVisualElement" IsHitTestVisible="false" Opacity="0" Background="#A5FFFFFF" CornerRadius="3"/>
                        <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="#FF45D6FA" BorderThickness="1" CornerRadius="3"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="True">
                            <Setter Property="Visibility" Value="Visible" TargetName="ExpandSite"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- TreeView Item-->
    <Style TargetType="TreeViewItem">
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TreeViewItem">
                    <Grid Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Header" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="#FF999999"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Unselected" GeneratedDuration="00:00:00.3000000" To="Selected"/>
                                    <VisualTransition From="Selected" GeneratedDuration="00:00:00.5000000" To="Unselected"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="select" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.75"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedInactive">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="inactive" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.4"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HasItemsStates">
                                <VisualState x:Name="HasItems"/>
                                <VisualState x:Name="NoItems">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpansionStates">
                                <VisualState x:Name="Collapsed"/>
                                <VisualState x:Name="Expanded">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="15"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <ToggleButton HorizontalAlignment="Stretch" x:Name="Expander" VerticalAlignment="Stretch" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}">
                            <ToggleButton.Template>
                                <ControlTemplate TargetType="ToggleButton">
                                    <Grid x:Name="Root" Background="Transparent">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal"/>
                                                <VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimation Duration="0" Storyboard.TargetName="UncheckedBrush" Storyboard.TargetProperty="Color" To="{StaticResource NormalBrushGradient1}"/>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To=".7"/>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                            <VisualStateGroup x:Name="CheckStates">
                                                <VisualState x:Name="Unchecked"/>
                                                <VisualState x:Name="Checked">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Grid HorizontalAlignment="Right" Margin="2 2 5 2">
                                            <Path Height="9" HorizontalAlignment="Right" x:Name="UncheckedVisual" VerticalAlignment="Center" Width="6" Fill="#FF000000" StrokeLineJoin="Miter" StrokeThickness="1" Data="M 0,0 L 0,9 L 5,4.5 Z">
                                                <Path.Stroke>
                                                    <SolidColorBrush Color="#FF989898" x:Name="UncheckedBrush"/>
                                                </Path.Stroke>
                                            </Path>
                                            <Path Height="6" HorizontalAlignment="Center" x:Name="CheckedVisual" VerticalAlignment="Center" Width="6" Opacity="0" Fill="#FF262626" StrokeLineJoin="Miter" Data="M 6,0 L 6,6 L 0,6 Z"/>
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </ToggleButton.Template>
                        </ToggleButton>
                        <Rectangle x:Name="select" IsHitTestVisible="False" Opacity="0" Grid.Column="1" Fill="{StaticResource NormalBrush}" Stroke="{StaticResource NormalBorderBrush}" StrokeThickness="2" RadiusX="2" RadiusY="2"/>
                        <Rectangle x:Name="inactive" IsHitTestVisible="False" Opacity="0" Grid.Column="1" Fill="{StaticResource NormalBrush}" Stroke="{StaticResource NormalBorderBrush}" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                        <Button Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_Header" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ClickMode="Hover">
                            <Button.Template>
                                <ControlTemplate TargetType="Button">
                                    <Grid Background="{TemplateBinding Background}">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualStateGroup.Transitions>
                                                    <VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="Pressed"/>
                                                    <VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                </VisualStateGroup.Transitions>
                                                <VisualState x:Name="Normal"/>
                                                <VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" Storyboard.TargetName="hover" Storyboard.TargetProperty="Opacity" To=".5"/>
                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" Storyboard.TargetName="content" Storyboard.TargetProperty="Opacity" To=".55"/>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Rectangle x:Name="Background" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource NormalBrush}" Stroke="{x:Null}" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                        <Rectangle x:Name="hover" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource HoverBrush}" Stroke="{x:Null}" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                        <ContentPresenter Cursor="{TemplateBinding Cursor}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" x:Name="content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                    </Grid>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                        <ItemsPresenter x:Name="ItemsHost" Visibility="Visible" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="false">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ItemsHost"/>
                        </Trigger>
                        <Trigger Property="HasItems" Value="false">
                            <Setter Property="Visibility" Value="Hidden" TargetName="Expander"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!-- Tree View -->
    <Style TargetType="TreeView">
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Background" Value="{StaticResource ShadeBrush}"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TreeView">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <SolidColorBrush x:Key="BorderBrush" Color="#FF000000"/>
                        </Grid.Resources>
                        <Border x:Name="Border" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" Background="{TemplateBinding Background}">
                            <ScrollViewer BorderBrush="Transparent" BorderThickness="0" Padding="{TemplateBinding Padding}" Margin="1" x:Name="ScrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                <ItemsPresenter Margin="5" x:Name="TreeItems"/>
                            </ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>